<table width="86%" border="0" cellpadding="0" cellspacing="0" class="frame_right">
 <tr>
    <td align="left" width="245" class="call"><img src="<?php echo $this->site['theme_url']?>index/pics/Callus.png" />
        <!--<strong><?php echo Kohana::lang('site_lang.lbl_call_us')?>:<br /> (84 8) 3910 5055</strong><br />
      <?php echo Kohana::lang('site_lang.lbl_between')?> <br />(8:30am - 6:00pm)--></td>
  </tr>
  <tr>
    <td align="left" class="dangky"><a  class="dangky" href="<?php echo $this->site['base_url']?>registers"><?php echo Kohana::lang('site_lang.lbl_register_online')?></a></td>
  </tr>
  <tr>
    <td align="left">
	<?php
$mEventList = $this->get_events();
if($this->uri->segment(2)=='event'){
$prm = $this->uri->argument(1);
$chm = $this->uri->argument(2);
}
$month=date("m",time());
$year = date("Y",time());
$adj='';
if(isset($prm)){
$m=$prm+$chm;
}else{
$m= date("m");
}
$d= date("d");     // Finds today's date
$y= date("Y");     // Finds today's year
$no_of_days = date('t',mktime(0,0,0,$m,1,$y)); // This is to calculate number of days in a month
$mn=date('m',mktime(0,0,0,$m,1,$y)); // Month is calculated to display at the top of the calendar
$yn=date('Y',mktime(0,0,0,$m,1,$y)); // Year is calculated to display at the top of the calendar
$j= date('w',mktime(0,0,0,$m,1,$y)); // This will calculate the week day of the first day of the month
if($mn==01) $mlang= Kohana::lang('site_lang.lbl_01');
else if ($mn==02) $mlang= Kohana::lang('site_lang.lbl_02');
else if ($mn==03) $mlang= Kohana::lang('site_lang.lbl_03');
else if ($mn==04) $mlang= Kohana::lang('site_lang.lbl_04');
else if ($mn==05) $mlang= Kohana::lang('site_lang.lbl_05');
else if ($mn==06) $mlang= Kohana::lang('site_lang.lbl_06');
else if ($mn==07) $mlang= Kohana::lang('site_lang.lbl_07');
else if ($mn==08) $mlang= Kohana::lang('site_lang.lbl_08');
else if ($mn==09) $mlang= Kohana::lang('site_lang.lbl_09');
else if ($mn==10) $mlang= Kohana::lang('site_lang.lbl_10');
else if ($mn==11) $mlang= Kohana::lang('site_lang.lbl_11');
else  $mlang= Kohana::lang('site_lang.lbl_12');
for($k=1; $k<=$j; $k++){ // Adjustment of date starting
$adj .="<td>&nbsp;</td>";
}
?>
<table bordercolor='#FFFF00' cellspacing='0' cellpadding='0'  class="event" width="100%"  style="height:230px" >
<tr>
    	<td><a href="http://dalecarnegie.com.vn/uploadsfile/images/Dale_Carnegie_Corporate_Brochure_2010-2011.pdf"><img src="<?php echo $this->site['theme_url']?>index/pics/Banner_brochure.gif" /></a></td>
</tr>
<tr><td width="250" height="5" bgcolor="#CCCCCC"></td></tr>
	<tr>
    	<td><a href="http://dalecarnegie.com.vn/news/detail/117"><img src="<?php echo $this->site['theme_url']?>index/pics/HO-TRO-2.gif" /></a></td>
    </tr>
<tr><td height="5"></td></tr>
	<tr>
    	<td><a href="/uploadsfile/images/new-schedule.pdf"><img src="<?php echo $this->site['theme_url']?>index/pics/schedule_class.jpg" /></a></td>
    <!--<td class="title"><?php echo Kohana::lang('site_lang.lbl_event_calendar')?></td></tr>
	<tr><td style="padding:0px 0px 0px 10px" align="center">
		<table width="70%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="14%"><a href='<?php echo $this->site['base_url']?>home/event/<?php echo $m?>/-1'><img src="<?php echo $this->site['theme_url']?>index/pics/calendal_back.jpg"/></a></td>
			<td width="40%"><input name="" type="text" value="<?php echo $mn;?>" readonly="true" size="8"  style="text-align:center"/></td>
			<td width="28%"><input name="" type="text"  readonly="true" style="text-align:center" value="<?php echo $yn;?>" size="6"/></td>
			<td width="18%" style="padding-left:5px"><a href='<?php echo $this->site['base_url']?>home/event/<?php echo $m?>/1'><img src="<?php echo $this->site['theme_url']?>index/pics/calendal_next.jpg" /></a></td>
		  </tr>
		</table>
 	</td>
	</tr>
	<tr><td>
		<table cellspacing='0' cellpadding='0'  width='85%' border='0' align="center"  class="calendar">
			<tr>
			<td><?php echo Kohana::lang('site_lang.lbl_sun')?></td>
			<td><?php echo Kohana::lang('site_lang.lbl_mon')?></td>
			<td><?php echo Kohana::lang('site_lang.lbl_tue')?></td>
			<td><?php echo Kohana::lang('site_lang.lbl_wed')?></td>
			<td><?php echo Kohana::lang('site_lang.lbl_thu')?></td>
			<td><?php echo Kohana::lang('site_lang.lbl_fri')?></td>
			<td><?php echo Kohana::lang('site_lang.lbl_sat')?></td>
			</tr><tr>
<?php
//////// Starting of the days//////////
for($i=1;$i<=$no_of_days;$i++){
$link='';
$class='';
$Tip='';
$link='<div class="calendar">'.$i.'</div>';
if($d==$i && $m==$month && $y==$year){
$link='<div class="today">'.$i.'</div>';
}	
foreach($mEventList as $event){
	$time = mktime(0,0,0,$m,$i,$y);
	$timeEvent = mktime(0,0,0,date('m',$event['programs_begin_date']),date('d',$event['programs_begin_date']),date('Y',$event['programs_begin_date']));
	$timeEventEnd = mktime(0,0,0,date('m',$event['programs_end_date']),date('d',$event['programs_end_date']),date('Y',$event['programs_end_date']));
	if($timeEvent <= $time && $time <= $timeEventEnd){ 
	$link='<div class="event"><a  href="'.$this->site['base_url'].'library/programs/'.$event['programs_id'].'" title="'.$event['programs_title'].'">'.$i.'</a></div>';
	$Tip='<span id="event_'.$i.'" style="display:none;text-align:justify;">'.$event['programs_title'].'</span>';
	}
}
echo $adj."<td >$link</td>";
$adj='';
$j ++;
if($j==7){echo "</tr><tr>";
$j=0;}
echo $Tip;
}
?>
</tr></table></td>--></tr>
</table>
	</td>
  </tr>
  <tr>
    <td  class="space_line"></td>
  </tr>
  <tr>
  			<td align="center"><a href="http://dalecarnegie.com.vn/library/programs/66"><img src="<?php echo $this->site['theme_url']?>index/pics/books_banner.JPG" /></a></td>	
  </tr>
  <tr>
    <td  class="space_line"></td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="item_boder">
      <tr>
        <td  align="left" class="item_boder_title" ><!--<a href="http://lanhdaodacnhantam.com" target="_blank"><?php echo Kohana::lang('site_lang.lbl_forum')?></a>--><?php echo Kohana::lang('site_lang.lbl_forum')?></td>
      </tr>
      <tr>
        <td  align="center" class="item_boder_content">
        <a href="http://lanhdaodacnhantam.com"><img src="<?php echo $this->site['theme_url']?>index/pics/forum_rightmenu.jpg" /></a>
        </td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
     <table class="item_client" width="100%" border="0" cellpadding="0" cellspacing="0">
     <tr>
     <td align="center">
     <a href="http://dalecarnegie.com.vn/knowledges/type_detail/13"><img src="<?php echo $this->site['theme_url']?>index/pics/img_newsletter.jpg" width="250" height="95" /></a>
     </td>
     <tr>
    </table>
     </td>
  </tr>
  <tr>
    <td  class="space_line"></td>
  </tr>
  <tr>
    <td><table class="item_client" width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td  align="left" class="item_title" ><?php echo Kohana::lang('site_lang.lbl_clients_say')?>?</td>
      </tr>
      <tr>
       <td  align="left" class="item_content" style="padding-right:5px; text-align:justify;"><ul>
		<?php 
		$mTestimonials = $this->get_testimonial();
		foreach($mTestimonials as $list) {?>
          <li><span><a href="<?php echo $this->site['base_url']?>clients/testimonials/<?php echo $list['testimonials_id']?>"><strong><?php echo $list['testimonials_title'];?></strong></a></span><br />
           <?php echo $list['testimonials_description'];?>
		   <span class="chitiet"><a href="<?php echo $this->site['base_url']?>clients/testimonials/<?php echo $list['testimonials_id']?>"><?php echo Kohana::lang('site_lang.lbl_more') ?></a></span></li>
			<?php }?>
           </ul></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td  class="space_line"></td>
  </tr>
  <tr>
    <td >
	<table class="item_client" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
       	<td align="center">
            	<!--<iframe src="http://www.facebook.com/plugins/likebox.php?id=106296199423295&amp;width=250&amp;connections=10&amp;stream=false&amp;header=true&amp;height=287" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:250px; height:287px;" allowTransparency="true"></iframe>-->
                <iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fdalecarnegievietnam&amp;width=250&amp;connections=8&amp;stream=true&amp;header=true&amp;height=587" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:250px; height:587px;" allowTransparency="true"></iframe>
            </td>
        </tr>
      <tr>
        <td  align="left" class="item_title" style="font-size:14px;" ><?php echo Kohana::lang('site_lang.lbl_dalecarnegie_gifcard')?></td>
      </tr>
      <tr>
        <td class="item_content"><a href="http://dalecarnegie.com.vn/corner/detail/1"><img src="<?php echo $this->site['theme_url']?>index/pics/img_quatang.jpg" width="250" height="123" /></a></td>
      </tr>
    </table>
	</td>
  </tr>
  <tr>
    <td  class="space_line"></td>
  </tr>
  <tr>
    <td>
<table class="item_client" width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td  align="left" class="item_title" ><?php echo Kohana::lang('site_lang.lbl_dalecarnegie_world')?></td>
      </tr>
      <tr>
        <td class="item_content"><a href="http://www.dalecarnegie.com" target="_blank">
	<img src="<?php echo $this->site['theme_url']?>index/pics/ban_do.jpg" width="250" height="140" />
	</a></td>
      </tr>
    </table>
	</td>
  </tr>
  <tr>
    <td  class="space_line"></td>
  </tr>
  <tr>
    <td align="center" class="copy">
	<a href="<?php echo $this->site['base_url']?>pages/detail/2">
	<img src="<?php echo $this->site['theme_url']?>index/pics/img_copy.jpg" width="250" height="43" />
	</a>
	</td>
  </tr>
</table>